﻿CREATE TABLE [dbo].[ebook_Item] (
    [BookCostId]  UNIQUEIDENTIFIER CONSTRAINT [DF_purchase_BookCost_BookCostId] DEFAULT (newid()) NOT NULL,
    [BookId]      UNIQUEIDENTIFIER NOT NULL,
    [TotalCost]   INT              NOT NULL,
    [Enable] BIT NOT NULL DEFAULT ((0)), 
    [Text] NVARCHAR(MAX) NOT NULL, 
		[InnerPath] NVARCHAR(1024) NOT NULL,
    CONSTRAINT [PK_ebook_Item] PRIMARY KEY CLUSTERED ([BookCostId] ASC),
    CONSTRAINT [FK_ebook_Item_text_Book] FOREIGN KEY ([BookId]) REFERENCES [dbo].[text_Book] ([BookId]),
    CONSTRAINT [IX_ebook_Item_BookId] UNIQUE NONCLUSTERED ([BookId] ASC)
);



